package ch06;

public class User {
    private int userId;
    private String userName;
    private boolean sex;
    private Role role;

    public User() {
    }

    public User(int userId,Role role) {
        this.userId = userId;
        this.role =role;
    }

    public User(String uname) { //映射到  xml 的配置文件中 的构造器 的name属性
        this.userName = uname;
    }

    public User(int userId, String userName, boolean sex) {
        this.userId = userId;
        this.userName = userName;
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", sex=" + sex +
                '}';
    }
}
